From: Dan Winship Date: Wed, 20 Apr 2011 20:04:03 +0000 (-0400) Subject: workspace: avoid an assertion in a new window/deleted workspace race X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8320 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e38d83fd443fa9a416acaed1b439bfffa875fc12;p=gnome-shell.git workspace: avoid an assertion in a new window/deleted workspace race If a window appeared on a workspace that was then quickly removed, we could hit an assertion in mutter. Avoid that. https://bugzilla.gnome.org/show_bug.cgi?id=648132 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 3a07585ad..2d487660e 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1113,7 +1113,9 @@ Workspace.prototype = { // the compositor finds out about them... Mainloop.idle_add(Lang.bind(this, function () { - if (this.actor && metaWin.get_compositor_private()) + if (this.actor && + metaWin.get_compositor_private() && + metaWin.get_workspace() == this.metaWorkspace) this._doAddWindow(metaWin); return false; })); diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 96fd52bc5..8c12e86c0 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -276,7 +276,9 @@ WorkspaceThumbnail.prototype = { // the compositor finds out about them... Mainloop.idle_add(Lang.bind(this, function () { - if (this.actor && metaWin.get_compositor_private()) + if (this.actor && + metaWin.get_compositor_private() && + metaWin.get_workspace() == this.metaWorkspace) this._doAddWindow(metaWin); return false; }));